package com.zyz.zchat;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.stage.Stage;

import java.io.IOException;
import java.net.URL;

public class ZChat extends Application {
    @Override
    public void start(Stage stage) throws IOException {
        URL url=ZChat.class.getResource("UI.fxml");
        FXMLLoader fxmlLoader = new FXMLLoader(url);
        Scene scene = new Scene(fxmlLoader.load(), 1280, 800);
        ZChatController controller= fxmlLoader.getController();
        controller.initListener();
        stage.setOnCloseRequest((event)->{
            System.exit(0);
        });
        stage.setTitle("ZChat!");
        stage.setScene(scene);
        stage.show();
    }

    public static void main(String[] args) {
        launch();
    }
}